package connection;


import com.mysql.jdbc.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author tulio
 */
public class ConnectionFactory {
    
    public Connection getConnection() {
        System.out.println("Conectando ao banco");
        try {
            return (Connection) DriverManager.getConnection("jdbc:mysql://localhost/fj21", "root", "");
        } catch(SQLException e) {
            throw new RuntimeException(e);
        }
    }
    
}
